home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_136 / zoo / zoo.man < prev    next >
Text File  |  1992-05-06  |  28KB  |  663 lines

  1.          
  2.         
  3.         
  4.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  5.         
  6.         
  7.         
  8.         NAME
  9.              zoo - manipulate archives of files in compressed form
  10.         
  11.         SYNOPSIS
  12.              zoo {acDehlLPTuUvx}[cdEfInMNoOpPquv1:./@] archive [file] ...
  13.              zoo -command archive [file] ...
  14.              zoo h
  15.         
  16.         DESCRIPTION
  17.              ^[[4mZoo^[[m is used to create and maintain collections of files in
  18.              compressed form.  It uses a Lempel-Ziv compression algorithm
  19.              that gives space savings in the range of 20% to 80% depend-
  20.              ing on the type of file data.
  21.         
  22.              The command ^[[4mzoo^[[m h gives summary of commands.
  23.         
  24.              ^[[4mZoo^[[m will not add an archive to itself, nor add the archive's
  25.              backup (with .bak extension to the filename) to the archive.
  26.         
  27.              ^[[4mZoo^[[m has two types of commands:  Expert commands, which con-
  28.              sist of one command letter followed by zero or more modifier
  29.              characters, and Novice commands, which consist of a hyphen
  30.              (`-') followed by a command word that may be abbreviated.
  31.              Expert commands are case-sensitive but Novice commands are
  32.              not.
  33.         
  34.              When ^[[4mzoo^[[m adds a file to an existing archive, it marks as
  35.              deleted any already-archived file with the same name.
  36.              (Directory prefixes are significant in this comparison if
  37.              and only if directory names are being stored.) Deleted files
  38.              may be later undeleted.  Archives may be packed to recover
  39.              space occupied by deleted files.
  40.         
  41.              All commands assume that the archive name ends with the
  42.              characters .zoo unless a different extension is supplied.
  43.         
  44.              Novice commands
  45.         
  46.              Novice commands may be abbreviated to a hyphen followed by
  47.              at least one command character.  Each Novice command works
  48.              in two stages. First, the command does its intended work.
  49.              Then, if the result was that one or more files were deleted
  50.              in the specified archive, the archive is packed.  If packing
  51.              occurs, the original unpacked archive is always left behind
  52.              with an extension of .bak.
  53.         
  54.              No Novice command ever stores the directory prefix of a
  55.              file.  When a Novice command is used to add a file to an
  56.              archive, any already-archived file with the same name,
  57.              regardless of the directory prefix, is marked deleted.
  58.         
  59.         
  60.         
  61.         
  62.         
  63.         Printed 9/14/87           Aug 28, 1987                          1
  64.         
  65.         
  66.         
  67.         
  68.         
  69.         
  70.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  71.         
  72.         
  73.         
  74.              The Novice commands are as follows.
  75.         
  76.              -add    Adds the specified files to the archive.
  77.         
  78.              -freshen
  79.                   Adds a specified file to the archive if and only if an
  80.                   older file by the same name already exists in the
  81.                   archive.
  82.         
  83.              -delete
  84.                   Deletes the specified files from the archive.
  85.         
  86.              -update
  87.                   Adds a specified file to the archive either:  if an
  88.                   older file by the same name already exists in the
  89.                   archive or:  if a file by the same name does not
  90.                   already exist in the archive.
  91.         
  92.              -extract
  93.                   Extracts the specified files from the archive.  If no
  94.                   file is specified all files are extracted.
  95.         
  96.              -move
  97.                   Equivalent to -add except that source files are deleted
  98.                   after addition.
  99.         
  100.              -print
  101.                   Equivalent to -extract except that extracted data are
  102.                   sent to standard output.
  103.         
  104.              -list
  105.                   Gives information about the specified archived files
  106.                   including any attached comments.  If no files are
  107.                   specified all files are listed.  Deleted files are not
  108.                   listed.
  109.         
  110.              -test
  111.                   Equivalent to -extract except that the extracted data
  112.                   are not saved but any errors encountered are reported.
  113.         
  114.              -comment
  115.                   Allows the user to add or update comments attached to
  116.                   archived files.  When prompted, the user may:  type a
  117.                   carriage return to skip the file, leaving any current
  118.                   comment unchanged;  or type a (possibly null) comment
  119.                   of up to 65,535 characters terminated by /end (case-
  120.                   insensitive) on a separate line;  or type the end-of-
  121.                   file character (normally control D) to skip all remain-
  122.                   ing files.
  123.         
  124.              -delete
  125.                   Deletes the specified files.
  126.         
  127.         
  128.         
  129.         Printed 9/14/87           Aug 28, 1987                          2
  130.         
  131.         
  132.         
  133.         
  134.         
  135.         
  136.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  137.         
  138.         
  139.         
  140.              The correspondence between Novice and Expert commands is as follows.
  141.         
  142.         Novice                                                   Equivalent
  143.         Command    Description                                   Expert Command
  144.         _______________________________________________________________________
  145.         -add       add files to archive                          aP:
  146.         -extract   extract files from archive                    x
  147.         -move      move files to archive                         aMP:
  148.         -test      test archive integrity                        xNd
  149.         -print     extract files and send to standard output     xp
  150.         -delete    delete files from archive                     DP
  151.         -list      list information about archived files         v
  152.         -update    update archive by adding new or newer files   aunP:
  153.         -freshen   freshen archive by adding newer files         auP:
  154.         -comment   allows user to attach comments to files       c
  155.         
  156.              Expert commands
  157.         
  158.              The general format of expert commands is:
  159.         
  160.              ^[[4mzoo^[[m {acDehlPTuUvx}[cdEfInMNoOpPquv1:./@] archive [file] ...
  161.         
  162.              The characters enclosed within {} are commands.  Choose any
  163.              one of these.  The characters enclosed within [] just to the
  164.              right of the {} are modifiers and zero or more of these may
  165.              immediately follow the command character.  All combinations
  166.              of command and modifier characters may not be valid.
  167.         
  168.              Files are added to an archive with the command:
  169.         
  170.              ^[[4mzoo^[[m {au}[cfIMnPqu:] archive [file] ...
  171.         
  172.              Command characters are:
  173.         
  174.              a    Add each specified file to archive.  Any already-
  175.                   archived file with the same name is marked as deleted.
  176.         
  177.              u    Do an update of the archive.  A specified file is added
  178.                   to the archive only if a copy of it is already in the
  179.                   archive and the copy being added is newer than the copy
  180.                   already in the archive.
  181.         
  182.              The following modifiers are specific to these commands.
  183.         
  184.              M    Move files to archive.  This makes ^[[4mzoo^[[m delete (unlink)
  185.                   the original files after they have been added to the
  186.                   archive.  Files are deleted after addition of all files
  187.                   to the archive is complete and after any requested
  188.                   packing of the archive has been done, and only if ^[[4mzoo^[[m
  189.                   detected no errors.
  190.         
  191.         
  192.         
  193.         
  194.         
  195.         Printed 9/14/87           Aug 28, 1987                          3
  196.         
  197.         
  198.         
  199.         
  200.         
  201.         
  202.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  203.         
  204.         
  205.         
  206.              n    Add new files only.  A specified file is added only if
  207.                   it isn't already in the archive.
  208.         
  209.              P    Pack archive after files have been added.
  210.         
  211.              u    Applied to the a command, this modifier makes it behave
  212.                   identically to the u command.
  213.         
  214.                   The combination of the n modifier with the u modifier
  215.                   or u command causes addition of a file to the archive
  216.                   either if the file is not already in the archive, ^[[4mor^[[m if
  217.                   the file is already in the archive but the archived
  218.                   copy is older than the copy being added.
  219.         
  220.              :    Do not store directory names.  In the absence of this
  221.                   modifier ^[[4mzoo^[[m stores the full pathname of each archived
  222.                   file.
  223.         
  224.              I    Read filenames to be archived from standard input. ^[[4mZoo^[[m
  225.                   will read its standard input and assume that each line
  226.                   of text contains a filename.  Under AmigaDOS and the
  227.                   **IX family, the entire line is used.  Under MS-DOS and
  228.                   VAX/VMS, ^[[4mzoo^[[m assumes that the filename is terminated by
  229.                   a blank, tab, or newline; thus it is permissible for
  230.                   the line of text to contain more than one field
  231.                   separated by white space, and only the first field will
  232.                   be used.
  233.         
  234.                   Under the **IX family of operating systems, ^[[4mzoo^[[m can be
  235.                   used as follows in a pipeline:
  236.         
  237.                        find . -print | zoo aI sources
  238.         
  239.         
  240.         
  241.                   If the I modifier is specified, no filenames may be
  242.                   supplied on the command line itself.
  243.         
  244.              Files are extracted from an archive with the command:
  245.         
  246.              ^[[4mzoo^[[m {ex}[dNoOpq./@] archive [file] ...
  247.         
  248.              The e and x commands are synonymous.  If no file was speci-
  249.              fied, all files are extracted from the archive.
  250.         
  251.              The following modifiers are specific to the e and x com-
  252.              mands:
  253.         
  254.              N    Do not save extracted data but report any errors
  255.                   encountered.
  256.         
  257.         
  258.         
  259.         
  260.         
  261.         Printed 9/14/87           Aug 28, 1987                          4
  262.         
  263.         
  264.         
  265.         
  266.         
  267.         
  268.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  269.         
  270.         
  271.         
  272.              O    Overwrite files.  Normally, if a file being extracted
  273.                   would overwrite an already-existing file of the same
  274.                   name, ^[[4mzoo^[[m asks you if you really want to overwrite it.
  275.                   You may answer the question with `y', which means yes,
  276.                   overwrite; or `n', which means no, don't overwrite; or
  277.                   `a', which means assume the answer is `y' for this and
  278.                   all subsequent files.  The O modifier makes ^[[4mzoo^[[m assume
  279.                   that files may always be overwritten.
  280.         
  281.                   The O, N, and p modifiers are mutually exclusive.
  282.         
  283.              o    This is equivalent to the O modifier if and only if it
  284.                   is given at least twice.  It is otherwise ignored.
  285.         
  286.              p    Pipe extracted data to standard output.  Error messages
  287.                   are piped to standard output as well.  However, if a
  288.                   bad CRC is detected, an error message is sent both to
  289.                   standard error and to standard output.
  290.         
  291.              /    Extract to original pathname.  Any needed directories
  292.                   must already exist.  In the absence of this modifier
  293.                   all files are extracted into the current directory.  If
  294.                   this modifier is doubled as //, needed directories need
  295.                   not exist and are created if necessary.
  296.         
  297.              Archived files are listed with the command:
  298.         
  299.              ^[[4mzoo^[[m {lLv}[adfqv@/1] archive[.zoo] [file] ...
  300.         
  301.              l    Information presented includes the date and time of
  302.                   each file, its original and current (compressed) sizes,
  303.                   and the percentage size decrease due to compression
  304.                   (labelled CF or compression factor).  If a file was
  305.                   added to the archive in a different timezone, the
  306.                   difference between timezones is shown in hours as a
  307.                   signed number.  As an example, if the difference is
  308.                   listed as +3, this means that the file was added to the
  309.                   archive in a timezone that is 3 hours west of the
  310.                   current timezone.  The file time listed is, however,
  311.                   always the original timestamp of the archived file, as
  312.                   observed by the user who archived the file, expressed
  313.                   as that user's local time.
  314.         
  315.                   If no filename is supplied all files are listed except
  316.                   deleted files.
  317.         
  318.              L    This is identical to the l command except that all sup-
  319.                   plied arguments must be archives and the contents of
  320.                   each are listed.
  321.         
  322.              v    This causes a verbose listing, which additionally shows
  323.                   any comment attached to each file.  Using the v
  324.         
  325.         
  326.         
  327.         Printed 9/14/87           Aug 28, 1987                          5
  328.         
  329.         
  330.         
  331.         
  332.         
  333.         
  334.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  335.         
  336.         
  337.         
  338.                   modifier with the l command has the same effect.
  339.         
  340.              In addition to the general modifiers described later, the
  341.              following modifiers can be applied to the archive list com-
  342.              mands.
  343.         
  344.              a    This gives a single-line format containing both each
  345.                   filename and the name of the archive, sorted by archive
  346.                   name.  It is especially useful with the L command,
  347.                   since the result can be further sorted on any field to
  348.                   give a master listing of the entire contents of a set
  349.                   of archives.
  350.         
  351.              1    This forces one filename to be listed per line.  It is
  352.                   most useful in combination with the f modifier.
  353.         
  354.              /    This forces any directory name to be always listed,
  355.                   even in fast columnized listings that do not normally
  356.                   include any directory names.
  357.         
  358.              Files may be deleted and undeleted from an archive with the
  359.              following commands:
  360.         
  361.              ^[[4mzoo^[[m {DU}[Pq1] archive file ...
  362.         
  363.              The D command deletes the specified files and the U command
  364.              undeletes the specified files.  The 1 modifier (the digit
  365.              one, not the letter ell) forces deletion or undeletion of at
  366.              most one file.  If multiple instances of the same file exist
  367.              in an archive, use of the 1 modifier may allow selective
  368.              extraction of one of these.
  369.         
  370.              Comments may be added to an archive with the command:
  371.         
  372.              ^[[4mzoo^[[m c archive
  373.         
  374.              This behaves identically to the -comment command.
  375.         
  376.              The timestamp of an archive may be adjusted with the com-
  377.              mand:
  378.         
  379.              ^[[4mzoo^[[m T[q] archive
  380.         
  381.              ^[[4mZoo^[[m normally attempts to maintain the timestamp of an
  382.              archive to reflect the age of the newest file stored in it.
  383.              Should the timestamp ever be incorrect it can be fixed with
  384.              the T command.
  385.         
  386.              An archive may be packed with the command:
  387.         
  388.              ^[[4mzoo^[[m P[EPq] archive
  389.         
  390.         
  391.         
  392.         
  393.         Printed 9/14/87           Aug 28, 1987                          6
  394.         
  395.         
  396.         
  397.         
  398.         
  399.         
  400.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  401.         
  402.         
  403.         
  404.              If the backup copy of the archive already exists, ^[[4mzoo^[[m will
  405.              refuse to pack the archive unless the P modifier is also
  406.              given.  The E modifier causes ^[[4mzoo^[[m not to save a backup copy
  407.              of the original archive after packing.  A unique temporary
  408.              file in the current directory is used to initially hold the
  409.              packed archive.  This file will be left behind if packing is
  410.              interrupted or if for some reason this file cannot be
  411.              renamed to the name of the original archive when packing is
  412.              complete.
  413.         
  414.              Packing removes any garbage data appended to an archive
  415.              because of Xmodem file transfer and also recovers space used
  416.              by comments that were replaced.
  417.         
  418.              General modifiers
  419.         
  420.              The following modifiers are applicable to several commands:
  421.         
  422.              c    Applied to the a and u commands, this causes the user
  423.                   to be prompted for a comment for each file added to the
  424.                   archive.  If the file being added has replaced a file
  425.                   already in the archive, any comment attached to the
  426.                   replaced file is shown to the user and becomes attached
  427.                   to the newly-added file unless the user changes it.
  428.                   Possible user responses are as described for the -com-
  429.                   ment command.  Applied to the archive list command l,
  430.                   the c modifier causes the listing of any comments
  431.                   attached to archived files.
  432.         
  433.              .    In conjunction with / or // this modifier causes any
  434.                   extracted pathname beginning with `/' to be interpreted
  435.                   relative to the current directory, resulting in the
  436.                   possible creation of a subtree rooted at the current
  437.                   directory.  In conjunction with the command P the .
  438.                   modifier causes the packed archive to be created in the
  439.                   current directory.  This is intended to allow users
  440.                   with limited disk space but multiple disk drives to
  441.                   pack large archives.
  442.         
  443.              d    Most commands that act on an archive act only on files
  444.                   that are not deleted.  The d modifier makes commands
  445.                   act on both normal and deleted files.  If doubled as
  446.                   dd, this modifier forces selection only of deleted
  447.                   files.
  448.         
  449.              f    Applied to the a and u commands, the f modifier causes
  450.                   fast archiving by adding files without compression.
  451.                   Applied to l it causes a fast listing of files in a
  452.                   multicolumn format.
  453.         
  454.              q    Be quiet.  Normally ^[[4mzoo^[[m lists the name of each file and
  455.                   what action it is performing.  The q modifier
  456.         
  457.         
  458.         
  459.         Printed 9/14/87           Aug 28, 1987                          7
  460.         
  461.         
  462.         
  463.         
  464.         
  465.         
  466.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  467.         
  468.         
  469.         
  470.                   suppresses this.  When files are being extracted to
  471.                   standard output, the q modifier suppresses the header
  472.                   preceding each file.  When archive contents are being
  473.                   listed, this modifier suppresses any header and
  474.                   trailer.  When a fast columnized listing is being
  475.                   obtained, this modifier causes all output to be com-
  476.                   bined into a single set of filenames for all archives
  477.                   being listed.
  478.         
  479.                   Error messages are never suppressed.
  480.         
  481.              @    Extract or list beginning at position n, where n is a
  482.                   decimal number following the @ sign without any inter-
  483.                   vening spaces.  This may be used to recover data from a
  484.                   damaged archive by skipping the damaged part.  The
  485.                   number specified must be the position within the
  486.                   archive of an undamaged directory entry.  This position
  487.                   is usually obtained from ^[[4mfiz^[[m(^[[4m1^[[m).
  488.         
  489.              Wildcard handling
  490.         
  491.              Under the **IX family of operating systems, the shell nor-
  492.              mally expands wildcards to a list of matching files.  Wild-
  493.              cards that are meant to match files within an archive must
  494.              therefore be escaped or quoted.  When selecting files to be
  495.              added to an archive, wildcard conventions are as defined for
  496.              the shell.  When selecting files from within an archive,
  497.              wildcard handling is done by ^[[4mzoo^[[m as described below.
  498.         
  499.              Under MS-DOS and AmigaDOS, quoting of wildcards is not
  500.              needed.  All wildcard expansion of filenames is done by ^[[4mzoo^[[m,
  501.              and wildcards inside directory names are expanded only when
  502.              listing or extracting files but not when adding them.
  503.         
  504.              The wildcard syntax interpreted by ^[[4mzoo^[[m is limited to the
  505.              following characters.
  506.         
  507.              *    Matches any sequence of zero or more characters.
  508.         
  509.              ?    Matches any single character.
  510.         
  511.                   Arbitrary combinations of * and ? are allowed.
  512.         
  513.              /    If a supplied pattern contains a slash anywhere in it,
  514.                   then the slash separating any directory prefix from the
  515.                   filename must be matched explicitly.  If a supplied
  516.                   pattern contains no slashes, the match is selective
  517.                   only on the filename.
  518.         
  519.              c-c  Two characters separated by a hyphen specify a charac-
  520.                   ter range.  All filenames beginning with those charac-
  521.                   ters will match.  The character range is meaningful
  522.         
  523.         
  524.         
  525.         Printed 9/14/87           Aug 28, 1987                          8
  526.         
  527.         
  528.         
  529.         
  530.         
  531.         
  532.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  533.         
  534.         
  535.         
  536.                   only by itself or preceded by a directory name.  It is
  537.                   not specially interpreted if it is part of a filename.
  538.         
  539.              MS-DOS users should note that ^[[4mzoo^[[m does not treat the dot as
  540.              a special character, and it does not ignore characters fol-
  541.              lowing an asterisk.  Thus * matches all filenames; *.*
  542.              matches filenames containing a dot; *_* matches filenames
  543.              containing an underscore;  and *z matches all filenames that
  544.              end with the character z, whether or not they contain a dot.
  545.         
  546.         FILES
  547.              xXXXXXX - temporary file used during packing
  548.              archive_name.bak - backup of archive
  549.         
  550.         SEE ALSO
  551.              compress(1), fiz(1)
  552.         
  553.         BUGS
  554.              Standard input cannot be archived nor can a created archive
  555.              be sent to standard output.  Spurious error messages may
  556.              appear if the filename of an archive is too long.
  557.         
  558.              Since ^[[4mzoo^[[m never archives any file with the same name as the
  559.              archive or its backup (regardless of any path prefixes),
  560.              care should be taken to make sure that a file to be archived
  561.              does not coincidentally have the same name as the archive it
  562.              is being added to.  It usually suffices to make sure that no
  563.              file being archived is itself a ^[[4mzoo^[[m archive.  (Previous ver-
  564.              sions of zoo sometimes tried to add an archive to itself.
  565.              This bug now seems to be fixed.)
  566.         
  567.              Only regular files are archived; directories and devices are
  568.              not.
  569.         
  570.              Early versions of MS-DOS have a bug that prevents "." from
  571.              referring to the root directory;  this leads to anomalous
  572.              results if the extraction of paths beginning with a dot is
  573.              attempted.
  574.         
  575.              VAX/VMS destroys case information unless arguments are
  576.              enclosed in double quotes.  For this reason if a command
  577.              given to ^[[4mzoo^[[m on a VAX/VMS system includes any uppercase
  578.              characters, it must be enclosed in double quotes.  Under
  579.              VAX/VMS, ^[[4mzoo^[[m does not currently restore file timestamps;
  580.              this will be fixed as soon as I figure out RMS extended
  581.              attribute blocks, or DEC supplies a utime() function, which-
  582.              ever occurs first.  Other VMS bugs, related to file struc-
  583.              tures, can often be overcome by using the program ^[[4mbilf^[[m.^[[4mc^[[m
  584.              that is supplied with ^[[4mzoo^[[m.
  585.         
  586.              It is not currently possible to create a ^[[4mzoo^[[m archive con-
  587.              taining all ^[[4mzoo^[[m archives that do not contain themselves.
  588.         
  589.         
  590.         
  591.         Printed 9/14/87           Aug 28, 1987                          9
  592.         
  593.         
  594.         
  595.         
  596.         
  597.         
  598.         ZOO(1)              UNIX Programmer's Manual               ZOO(1)
  599.         
  600.         
  601.         
  602.         DIAGNOSTICS
  603.              Error messages are intended to be self-explanatory and are
  604.              divided into three categories.  WARNINGS are intended to
  605.              inform the user of an unusual situation, such as a CRC error
  606.              during extraction, or -freshening of an archive containing a
  607.              file newer than one specified on the command line.  ERRORS
  608.              are fatal to one file, but execution continues with the next
  609.              file if any.  FATAL errors cause execution to be aborted.
  610.              The occurrence of any of these causes an exit status of 1.
  611.              Normal termination without any errors gives an exit status
  612.              of 0.
  613.         
  614.         FUTURE DIRECTIONS
  615.              A revised version of ^[[4mzoo^[[m is in the works which will allow
  616.              numbering of multiple versions of a file and automatically
  617.              perform end-of-line conversion for text files moved between
  618.              dissimilar systems.  It will be upward and downward compati-
  619.              ble with existing versions of ^[[4mzoo^[[m.
  620.         
  621.         THANKS
  622.              Thanks are due to:
  623.         
  624.              Paul Homchick, who provided numerous detailed reports about
  625.              some nasty bugs.
  626.         
  627.              Bill Davidsen, who fixed ^[[4mzoo^[[m'^[[4ms^[[m handling of daylight savings
  628.              time and also provided changes to make this manual format
  629.              correctly with ^[[4mtroff^[[m.
  630.         
  631.         AUTHOR
  632.              Rahul Dhesi
  633.         
  634.         
  635.         
  636.         
  637.         
  638.         
  639.         
  640.         
  641.         
  642.         
  643.         
  644.         
  645.         
  646.         
  647.         
  648.         
  649.         
  650.         
  651.         
  652.         
  653.         
  654.         
  655.         
  656.         
  657.         Printed 9/14/87           Aug 28, 1987                         10
  658.         
  659.         
  660.         
  661.         
  662. echo shar: "92 control characters may be missing from 'zoo.man'"
  663.